In order to decrease memory space and lower transmission speed, a gray-scale image is often compressed before being transmitted. In general, image compression is divided in three categories. The first method keeps data of the original gray-scale image and compresses it by elongated non-uniform coding, such as Huffmnan Coding. The second one, contrarily, abandons data of the original gray-scale image and compresses it by various transformations, such as Fourier Transform Coding and Walsh-Hadamard Transform Coding. The third method then utilizes vision persistence of human beings and compresses the gray-scale image by decreasing tone resolution while retaining brightness resolution.